/*
 *       ___      ___       ___  __    __   __   __  
 * |  | |__   /\   |  |__| |__  |__)  /  ` /__` /__` 
 * |/\| |___ /~~\  |  |  | |___ |  \ .\__, .__/ .__/ 
 *
 * Minecraft weather effects with pure CSS
 * © Copyright 2014 Moritz Marquardt
 *
 * https://github.com/moqmar/weather.css
 *
 * Licensed under MIT License (http://opensource.org/licenses/MIT)
 */

/* main element */
.weather {
    position: relative; overflow: hidden;
}
/* pseudo elements: positioning and setup */
.weather:before, .weather:after {
    content: "";
    position: absolute; left: -50%; top: -50%; right: -50%; bottom: -50%;
    z-index: 1;
    pointer-events: none;
    
    background: transparent repeat;
    opacity: 0.7;
    
    -webkit-transform: rotate(10deg);
    -moz-transform: rotate(10deg);
    -ms-transform: rotate(10deg);
    -o-transform: rotate(10deg);
    transform: rotate(10deg);
    
    -webkit-animation-name: weather;
    -webkit-animation-timing-function: linear;
    -webkit-animation-iteration-count: infinite;
    animation-name: weather;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}
.weather:after {
    opacity: 0.8;
    -webkit-animation-name: weather2;
    animation-name: weather2;
}
/* rain (fast, rain.png) */
.weather.rain:before, .weather.rain:after {
    background-image: url(../img/rain.png);
    -webkit-animation-duration: 2s;
    animation-duration: 2s;
}
.weather.rain:after {
    -webkit-animation-duration: 1.5s;
    animation-duration: 1.5s;
}
/* snow (slow, snow.png) */
.weather.snow:before, .weather.snow:after {
    background-image: url(../img/snow.png);
    -webkit-animation-duration: 6s;
    animation-duration: 6s;
}
.weather.snow:after {
    -webkit-animation-duration: 4.5s;
    animation-duration: 4.5s;
}
/* animation keyframes */
@-webkit-keyframes weather {
    from { background-position: 0 0px; }
    to { background-position: 0 1024px; }
}
@keyframes weather {
    from { background-position: 0 0px; }
    to { background-position: 0 1024px; }
}
@-webkit-keyframes weather2 {
    from { background-position: 64px 64px; }
    to { background-position: 64px 1088px; }
}
@keyframes weather2 {
    from { background-position: 64px 64px; }
    to { background-position: 64px 1088px; }
}
